﻿function ch(t){
if (t==1)
{
 document.getElementById("ch1").className="cur"; 
 document.getElementById("ch2").className=""; 
 document.getElementById("ch3").className=""; 
 document.getElementById("a2_3_1").className="lcur"; 
 document.getElementById("a2_3_2").className="lnone";
 document.getElementById("a2_3_3").className="lnone";
}
if (t==2)
{
 document.getElementById("ch1").className=""; 
 document.getElementById("ch2").className="cur"; 
 document.getElementById("ch3").className=""; 
 document.getElementById("a2_3_1").className="lnone"; 
 document.getElementById("a2_3_2").className="lcur";
 document.getElementById("a2_3_3").className="lnone";
}
if (t==3)
{
 document.getElementById("ch1").className=""; 
 document.getElementById("ch2").className=""; 
 document.getElementById("ch3").className="cur"; 
 document.getElementById("a2_3_1").className="lnone"; 
 document.getElementById("a2_3_2").className="lnone";
 document.getElementById("a2_3_3").className="lcur";
}
}

function qh(t,id,n){
  for(var i=1;i<=n;i++)
  {
     document.getElementById(id+i.toString()).className="";
     document.getElementById(id+"_"+i.toString()).className="none"; 
  }
  document.getElementById(id+t.toString()).className="cur"; 
  document.getElementById(id+"_"+t.toString()).className="cur";  
}

function $(id){
return document.getElementById(id)
}
//滚动留言
var speed=30;
var colee2=$("colee2");
var colee1=$("colee1");
var colee=$("colee");
colee2.innerHTML=colee1.innerHTML; //克隆colee1为colee2
function Marquee1(){
//当滚动至colee1与colee2交界时
if(colee2.offsetTop-colee.scrollTop<=0){
 colee.scrollTop-=colee1.offsetHeight; //colee跳到最顶端
 }else{
 colee.scrollTop++;
}
}
var MyMar1=setInterval(Marquee1,speed);//设置定时器
//鼠标移上时清除定时器达到滚动停止的目的
colee.onmouseover=function() {clearInterval(MyMar1);}
//鼠标移开时重设定时器
colee.onmouseout=function(){MyMar1=setInterval(Marquee1,speed);}
